package cn.edu.xmu.restfuldemo.model.BO;

import cn.edu.xmu.restfuldemo.model.PO.OrdersPo;
import lombok.*;

import java.time.LocalDateTime;

/**
 * @author Team3-5
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Orders {
    private Long id;
    private Long customerId;
    private Long shopId;
    private String orderSn;
    private Long pid;
    private String consignee;
    private Long regionId;
    private String address;
    private String mobile;
    private String message;
    private Byte orderType;
    private Long freightPrice;
    private Long couponId;
    private Long couponActivityId;
    private Long discountPrice;
    private Long originPrice;
    private Long presaleId;
    private Long grouponDiscount;
    private Integer rebateNum;
    private LocalDateTime confirmTime;
    private String shipmentSn;
    private Byte state;
    private Byte substate;
    private Byte beDeleted;
    private LocalDateTime gmtCreate;
    private LocalDateTime gmtModified;
    private Long grouponId;

    /**
     * orders->ordersPo
     * @return ordersPo
     */
    public OrdersPo newOrdersPo(){
        OrdersPo ordersPo = new OrdersPo();
        ordersPo.setId(this.id);
        ordersPo.setCustomerId(this.customerId);
        ordersPo.setShopId(this.shopId);
        ordersPo.setOrderSn(this.orderSn);
        ordersPo.setPid(this.pid);
        ordersPo.setConsignee(this.consignee);
        ordersPo.setRegionId(this.regionId);
        ordersPo.setAddress(this.address);
        ordersPo.setMobile(this.mobile);
        ordersPo.setMessage(this.message);
        ordersPo.setOrderType(this.orderType);
        ordersPo.setFreightPrice(this.freightPrice);
        ordersPo.setCouponId(this.couponId);
        ordersPo.setCouponActivityId(this.couponActivityId);
        ordersPo.setDiscountPrice(this.discountPrice);
        ordersPo.setOriginPrice(this.originPrice);
        ordersPo.setPresaleId(this.presaleId);
        ordersPo.setGrouponDiscount(this.grouponDiscount);
        ordersPo.setRebateNum(this.rebateNum);
        ordersPo.setConfirmTime(this.confirmTime);
        ordersPo.setShipmentSn(this.shipmentSn);
        ordersPo.setState(this.state);
        ordersPo.setSubstate(this.substate);
        ordersPo.setBeDeleted(this.beDeleted);
        ordersPo.setGmtCreate(this.gmtCreate);
        ordersPo.setGmtModified(this.gmtModified);
        ordersPo.setGrouponId(this.grouponId);
        return ordersPo;
    }
}
